﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CreateTemplate.aspx.cs" Inherits="Whir_System_Module_Template_CreateTemplate" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>新建模板</title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />
    <base target="_self" />
</head>
<body scroll="no">
    <form id="form1" runat="server">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA">
            <tr>
                <td height="26" colspan="2" align="left" class="form_title"><strong>新建模板</strong></td>
            </tr>
            <tr>
                <td width="80px" height="30" align="center" class="form_tdText">文件全名</td>
                <td align="left" class="form_td">
                    <asp:TextBox ID="txt1" runat="server" Text=".html"></asp:TextBox><br/>
                    <span class="form_desc">[例如：news.html]</span></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText"></td>
                <td align="left" class="form_td">
                    <asp:Button ID="btnSubmit" runat="server" Text="确定" CssClass="btn_default" OnClick="btnSubmit_Click"
                        OnClientClick="return checkForm();" />
                </td>
            </tr>
        </table>
        <asp:HiddenField ID="hfDir" runat="server" />
    </form>
</body>
</html>

<script language="javascript">
document.getElementById("hfDir").value = window.dialogArguments;

function checkForm()
{
    var txt = document.getElementById("txt1");
    if(txt.value.search(/^[a-zA-Z0-9]+\.[hH][tT][mM][lL]{0,1}$/) == -1)
    {
        alert("请输入正确的文件名[带后缀]!")
        txt.select();
        return false;
    }
    return true;
}
</script>

<script language="javascript" src="../../Js/common.js"></script>

<script type="text/javascript">initAutoFormStyle();</script>

